+2004-08-26 Matthias Clasen <mclasen@redhat.com>
+
+ Make gdk_window_process_[all]_updates() respect
+ update_freeze_counter (#144272, Soeren Sandmann)
+
+ * gdk/gdkwindow.c (gdk_window_schedule_update): New function to
+ install an idle for gdk_window_update_idle() if one isn't there
+ already.
+ (gdk_window_process_all_updates):
+ (gdk_window_process_updates): Only process the updates if the
+ window isn't frozen.
+ (gdk_window_invalidate_maybe_recurse): Schedule an update when
+ necessary.
+ (gdk_window_thaw_updates): Use gdk_window_schedule_update() instead
+ of directly installing the idle.
+
2004-08-22 Robert Ögren <gtk@roboros.com>
On Win32, make graphical tablets work on multi-monitor systems.
+2004-08-26 Matthias Clasen <mclasen@redhat.com>
+
+ Make gdk_window_process_[all]_updates() respect
+ update_freeze_counter (#144272, Soeren Sandmann)
+
+ * gdk/gdkwindow.c (gdk_window_schedule_update): New function to
+ install an idle for gdk_window_update_idle() if one isn't there
+ already.
+ (gdk_window_process_all_updates):
+ (gdk_window_process_updates): Only process the updates if the
+ window isn't frozen.
+ (gdk_window_invalidate_maybe_recurse): Schedule an update when
+ necessary.
+ (gdk_window_thaw_updates): Use gdk_window_schedule_update() instead
+ of directly installing the idle.
+
2004-08-22 Robert Ögren <gtk@roboros.com>
On Win32, make graphical tablets work on multi-monitor systems.
+2004-08-26 Matthias Clasen <mclasen@redhat.com>
+
+ Make gdk_window_process_[all]_updates() respect
+ update_freeze_counter (#144272, Soeren Sandmann)
+
+ * gdk/gdkwindow.c (gdk_window_schedule_update): New function to
+ install an idle for gdk_window_update_idle() if one isn't there
+ already.
+ (gdk_window_process_all_updates):
+ (gdk_window_process_updates): Only process the updates if the
+ window isn't frozen.
+ (gdk_window_invalidate_maybe_recurse): Schedule an update when
+ necessary.
+ (gdk_window_thaw_updates): Use gdk_window_schedule_update() instead
+ of directly installing the idle.
+
2004-08-22 Robert Ögren <gtk@roboros.com>
On Win32, make graphical tablets work on multi-monitor systems.
+2004-08-26 Matthias Clasen <mclasen@redhat.com>
+
+ Make gdk_window_process_[all]_updates() respect
+ update_freeze_counter (#144272, Soeren Sandmann)
+
+ * gdk/gdkwindow.c (gdk_window_schedule_update): New function to
+ install an idle for gdk_window_update_idle() if one isn't there
+ already.
+ (gdk_window_process_all_updates):
+ (gdk_window_process_updates): Only process the updates if the
+ window isn't frozen.
+ (gdk_window_invalidate_maybe_recurse): Schedule an update when
+ necessary.
+ (gdk_window_thaw_updates): Use gdk_window_schedule_update() instead
+ of directly installing the idle.
+
2004-08-22 Robert Ögren <gtk@roboros.com>
On Win32, make graphical tablets work on multi-monitor systems.
/* Code for dirty-region queueing
*/
-
static GSList *update_windows = NULL;
static guint update_idle = 0;
static gboolean debug_updates = FALSE;
+static gboolean
+gdk_window_update_idle (gpointer data)
+{
+ GDK_THREADS_ENTER ();
+ gdk_window_process_all_updates ();
+ GDK_THREADS_LEAVE ();
+
+ return FALSE;
+}
+
+static void
+gdk_window_schedule_update (GdkWindow *window)
+{
+ if (window && GDK_WINDOW_OBJECT (window)->update_freeze_count)
+ return;
+
+ if (!update_idle)
+ {
+ update_idle = g_idle_add_full (GDK_PRIORITY_REDRAW,
+ gdk_window_update_idle, NULL, NULL);
+ }
+}
+
static void
gdk_window_process_updates_internal (GdkWindow *window)
{
while (tmp_list)
{
- gdk_window_process_updates_internal (tmp_list->data);
+ GdkWindowObject *private = (GdkWindowObject *)tmp_list->data;
+
+ if (private->update_freeze_count)
+ update_windows = g_slist_prepend (update_windows, private);
+ else
+ gdk_window_process_updates_internal (tmp_list->data);
+
g_object_unref (tmp_list->data);
tmp_list = tmp_list->next;
}
flush_all_displays ();
}
-static gboolean
-gdk_window_update_idle (gpointer data)
-{
- GDK_THREADS_ENTER ();
- gdk_window_process_all_updates ();
- GDK_THREADS_LEAVE ();
-
- return FALSE;
-}
-
/**
* gdk_window_process_updates:
* @window: a #GdkWindow
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
- if (private->update_area)
+ if (private->update_area && !private->update_freeze_count)
{
gdk_window_process_updates_internal (window);
update_windows = g_slist_remove (update_windows, window);
update_windows = g_slist_prepend (update_windows, window);
private->update_area = gdk_region_copy (visible_region);
- if (!private->update_freeze_count && !update_idle)
- update_idle = g_idle_add_full (GDK_PRIORITY_REDRAW,
- gdk_window_update_idle, NULL, NULL);
+ gdk_window_schedule_update (window);
}
if (child_func)
g_return_if_fail (GDK_IS_WINDOW (window));
g_return_if_fail (private->update_freeze_count > 0);
- private->update_freeze_count--;
- if (!private->update_freeze_count && private->update_area && !update_idle)
- update_idle = g_idle_add_full (GDK_PRIORITY_REDRAW,
- gdk_window_update_idle, NULL, NULL);
+ if (--private->update_freeze_count == 0)
+ gdk_window_schedule_update (window);
}
/**